//
//  TWCorrelationCollectionCell.swift
//  EyepetizerImitative
//
//  Created by 田伟 on 2017/3/24.
//  Copyright © 2017年 个人. All rights reserved.
//

import UIKit

class TWCorrelationCollectionCell: UICollectionViewCell {
    
    @IBOutlet weak var topImageView: UIImageView!
    @IBOutlet weak var titleLabel: UILabel!
    @IBOutlet weak var timeLabel: UILabel!

    var model : TWItemModel?{
        didSet {
            guard let model = model else {
                return
            }
            // 设置控件
            topImageView.sd_setImage(with: URL(string: (model.cover?.detail)!))
            topImageView.contentMode = .scaleAspectFill
            titleLabel.text = model.title
            timeLabel.text = "#\(model.category!)" + " / " + "\(model.duration_tw!)"
        }
    }
    
    override func awakeFromNib() {
        super.awakeFromNib()
        // Initialization code
    }
}
